package com.nattakute.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nattakute.dao.LabDAO;
import com.nattakute.model.Lab;
import com.nattakute.service.LabService;

@Service("labService")
public class LapServicesImpl implements LabService{

	@Autowired 
	private LabDAO labDAO;
	
	
	@Transactional
	public List<Lab> getLab() {
		// TODO Auto-generated method stub
		return labDAO.getLab();
	}

	
	@Transactional
	public Lab getLabById(String id) {
		// TODO Auto-generated method stub
		return labDAO.getLabById(id);
	}

	
	@Transactional
	public Boolean addLab(Lab lab) {
		// TODO Auto-generated method stub
		return labDAO.addLab(lab);
	}

	
	@Transactional
	public Boolean deleteLab(Lab lab) {
		// TODO Auto-generated method stub
		return labDAO.deleteLab(lab);
	}

	
	@Transactional
	public Boolean updateLab(Lab lab) {
		// TODO Auto-generated method stub
		return labDAO.updateLab(lab);
	}

	
	@Transactional
	public Lab getLabByTimeTableId(String timeTableId) {
		// TODO Auto-generated method stub
		return labDAO.getLabByTimeTableId(timeTableId);
	}

	
	@Transactional
	public List<Lab> getLabByDepartmentId(String departmentID) {
		// TODO Auto-generated method stub
		return labDAO.getLabByDepartmentId(departmentID);
	}

	
	@Transactional
	public List<Lab> getActiveLab(String classID, String shifts, Date enddate) {
		// TODO Auto-generated method stub
		return labDAO.getActiveLab(classID, shifts, enddate);
	}


	public void setLabDAO(LabDAO labDAO) {
		this.labDAO = labDAO;
	}

	
}
